<main class="lyear-layout-content">
    <div class="container-fluid p-t-15">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class=" callout-success callout" style="padding: 0;">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb" style="padding: 1.25rem 1rem;background-color: white;">
                            <li class="breadcrumb-item"><a href="{:url('admin/post/index')}"
                                    style="color: #33cabb;">帖子列表</a>
                            </li>
                            <li class="breadcrumb-item active" aria-current="page">帖子详情</li>
                        </ol>
                    </nav>
                </div>

            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <h1>{$post.title}</h1>
                    <div class="fly-detail-info">
                        <!-- <span class="layui-badge">审核中</span> -->
                        <span class="layui-badge layui-bg-blue fly-detail-column">{$post.cate.name}</span>

                        {if condition="$post.accept > 0"}
                        <span class="layui-badge layui-bg-green">已采纳</span>
                        {else /}
                        <span class="layui-badge layui-bg-gray">未采纳</span>
                        {/if} {if condition="$post.state == 1"}
                        <span class="layui-badge layui-bg-black">置顶</span>
                        {elseif condition="$post.state == 2"}
                        <span class="layui-badge layui-bg-red">热门</span>
                        {else /}
                        <span class="layui-badge layui-bg-orange">精帖</span>
                        {/if}

                        <span class="fly-list-nums">
                            <a href="#comment"><i class="mdi mdi-comment-outline" title="回答"></i>
                                {$post.comment_count}</a>
                            <i class="mdi mdi-eye-outline" title="人气"></i> {$visitNum ? $visitNum
                            : 0}
                        </span>
                    </div>

                    <div class="detail-about">
                        <a class="fly-avatar" href="javascript:;">
                            <img src="{$post.user.avatar_cdn}" alt="{$post.user.nickname}">
                        </a>
                        <div class="fly-detail-user">
                            <a href="javascript:;" class="fly-link">
                                <cite>{$post.user.nickname}</cite>
                                <i class="iconfont icon-renzheng" title="认证信息：{$post.user.nickname}"></i>
                                <i class="layui-badge fly-badge-vip">VIP {$post.user.vip}</i>
                            </a>
                            <span>{$post.createtime_text}</span>
                        </div>
                        <div class="detail-hits" id="LAY_jieAdmin" data-id="123">
                            <span style="padding-right: 10px; color: #ff7200">悬赏：{$post.point}<i
                                    class="mdi mdi-one-up"></i></span>
                        </div>
                    </div>

                    <div class="detail-body photos">
                        <p>{$post.content}</p>
                    </div>
                </div>

            </div>
        </div>
    </div>
</main>

<script>
    layui.use(['layedit', 'code'], function () {
        var layedit = layui.layedit;

        layui.code({
            encode: true, //是否转义html标签。默认不开启
        });

        let build = layedit.build("L_content", {
            title: "代码展示",
            tool: [
                "strong", //加粗
                "italic", //斜体
                "underline", //下划线
                "del", //删除线
                "code", //代码区域
                "|", //分割线
                "left", //左对齐
                "center", //居中对齐
                "right", //右对齐
                "link", //超链接
                "unlink", //清除链接
                "face", //表情
                "image", //插入图片
                "help", //帮助
            ],
        }); //建立编辑器
    })
</script>